Loading...
 

CX_OBJECT_MANAGER::FreeVirtualMemory (from Dll version: 4.5.2.166275)

CX_OBJECT_MANAGER::FreeVirtualMemory ( from Dll version: 4.5.2.166275)

Description:

In a transaction ObjectStore allocates help objects for the reallocation of addresses, which disappear again at the end of the transaction.
When processing a large number of objects in a long transaction, we reach sizes of 10 × 106,100 × 106 auxiliary objects and often come to a halt due to
out of virtual memory exception.
FreeVirtualMemory starts a new ObjectStore transaction if (and only if) the allocated memory exceeds the maximum value passed as parameter.

1. caution: in a writing transaction you lose control over when to write back to the database.
2. use only if the basic developers have clarified that no memory leak in the ClassiX® system is the cause of the out of virtual memory exception.

Code example:
// eine Auswertung über sehr viele Objekte

iterate(UNSAFE)

{

  40 /* in MB */ GetManager(OBJECT) Call(FreeVirtualMemory)

  .  .  .

  // immer weiter rekursiv hinabsteigen, noch mehr Objekte "anfassen"

  iterate(UNSAFE)

  {

     . . .

     // und immer noch mehr

     iterate(UNSAFE)

     {

       . . .

     }

  }

}

 

Stack
Stack Position Object type Brief description
Stack(In) Top INTEGER Memory in MB (recommended value is 40 MB)
Stack(Out) Top
Function call: Call(FreeVirtualMemory)

Related topic: CXI_WINDOW_OBJECT::SetMaxMemoryUsage